//package com.zby.bi.config;
//
//
//import org.springframework.scheduling.annotation.Scheduled;
//import org.springframework.stereotype.Component;
//
//import javax.annotation.Resource;
//import java.time.LocalDateTime;
//import java.time.format.DateTimeFormatter;
//
//@Component
//public class WebSocketTask {
//    @Resource
//    private WebSocketServer webSocketServer;
//
//    /**
//     * 通过WebSocket每隔5秒向客户端发送消息
//     */
////    @Scheduled(cron = "0/2 * * * * ?")
////    public void sendMessageToClient() {
////        webSocketServer.sendToAllClient("yes")
////        ;
////    }
//
//    @Scheduled(cron = "0/5 * * * * ?")
//    public void sendMessageToClients() {
//        webSocketServer.sendToAllClient("");
//        ;
//    }
//}
